#pragma once
#include <list>
#include "win/win_frame.h"


class win_app : public win_frame
{
private:
    HWND            _hFocusWnd;
public:
    win_app() :_hFocusWnd(0)                        { _dwStyle = WS_OVERLAPPEDWINDOW; _dwExStyle = WS_EX_APPWINDOW; }
    ~win_app()                                      {}

    bool            MsgProcess();
    void            SetFocusWnd(HWND hWnd)          { _hFocusWnd = hWnd; }

    virtual LRESULT OnDestroy()                     {  PostQuitMessage(0); return 0; }
	virtual LRESULT OnSetFocus(HWND hWndLoseFocus)  { if(_hFocusWnd) SetFocus(_hFocusWnd); return 0; }
};
